home *** CD-ROM | disk | FTP | other *** search
- -- background: 50429 from stack: in
- -- bmap block id: 51937
- -- flags: 0000
- -- background id: 0
- -- name:
- ----- HyperTalk script -----
- on newStack
- extend
- end newStack
-
- on extend
- -- type "extend" into the message box and press return to make
- -- a year's worth of new cards.
- if the name of this stack contains "stack ideas"
- then
- answer "Please make a new stack before extending it." with "OK"
- else
- answer "Make another year of new cards?" with "OK" or "Cancel"
- if it is "Cancel" then exit extend
- put 60*60*24 into OneDay --seconds in a day
- go to last card of this background
- put getStartDate() into start --what date to begin on
- if start is "Cancel" then exit extend
- put start into it --a copy
- convert it to long date
- global calcMonth
- put word 1 of item 2 of it into calcMonth
- set name of this bkgnd to calcMonth
- repeat with cnt = 1 to 53 --weeks in a year
- put start into it --a copy
- convert it to long date
- delete item 1 of it -- get rid of "Monday,"
- put it into field "Week"
-
- Repeat with index = 1 to 7
- put word index of ("Monday Tuesday Wednesday Thursday" && "Friday Saturday Sunday") into myDay
- put start into it
- --convert each day so that date rolls over to "1"
- --at end of month
- convert it to long date
- put (word 2 of item 2 of it) into field myDay
- add OneDay to start
- end repeat
- doMenu New Card
- upDateBkgnd start --make a new background if new month
- end repeat
- doMenu "delete card" --get rid of extra card at end
- end if
- end extend
-
- on upDateBkgnd start
- global calcMonth
- put start into it --a copy
- convert it to long date
- if word 1 of item 2 of it <> calcMonth then --if new month
- --create a new background.
- put word 1 of item 2 of it into calcMonth
- doMenu "Cut Card" --new bkgnd is a copy with only name changed
- go previous card
- put the long name of this card into goodStack
- set lockScreen to true
- go to stack "home"
- --must go to another stack to avoid changing the original bkgnd
- doMenu "Paste Card"
- set name of this background to word 1 of item 2 of it
- doMenu "Cut Card"
- go goodStack
- set lockScreen to false
- doMenu "Paste Card"
- set name of this bkgnd to calcMonth
- end if
- end upDateBkgnd
-
- function getStartDate
- -- end of stack or today, whichever is newer
- get field "Week"
- if it is empty then put the date into it
- put startOfWeek(it) into it --so we can compare
- put the date into thisWeek
- put startOfWeek(thisWeek) into thisWeek --both at week starts in seconds
- if thisWeek < 2587766400 then
- answer "Set the Control Panel to today's date" with "OK"
- return "Cancel"
- end if
- if it >= thisWeek then return it --calendar already beyond today
- convert it to short date
- convert thisWeek to short date
- answer "Start from which date?" with it or thisWeek or "Cancel"
- if it is "Cancel" then return it
- convert it to seconds
- return it
- end getStartDate
-
- function startOfWeek aDate -- the seconds for the start of this week
- put 60*60*24 into OneDay --seconds in a day
- put aDate into it
- convert it to long date
- repeat while item 1 of it <> "Monday"
- convert it to seconds
- subtract OneDay from it
- convert it to long date
- end repeat
- convert it to seconds
- return it
- end startOfWeek
-
-
-
- on openBackground
- push recent card
- end openBackground
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=33 top=57 right=131 bottom=176
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 12
- -- style flags: 0
- -- line height: 12
- -- part name:
-
-
- -- part 3 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=183 top=57 right=131 bottom=326
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 12
- -- style flags: 0
- -- line height: 12
- -- part name:
-
-
- -- part 4 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=333 top=57 right=131 bottom=476
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 12
- -- style flags: 0
- -- line height: 12
- -- part name:
-
-
- -- part 5 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=33 top=155 right=229 bottom=176
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 12
- -- style flags: 0
- -- line height: 12
- -- part name:
-
-
- -- part 6 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=183 top=155 right=229 bottom=326
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 12
- -- style flags: 0
- -- line height: 12
- -- part name:
-
-
- -- part 7 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=333 top=155 right=229 bottom=476
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 12
- -- style flags: 0
- -- line height: 12
- -- part name:
-
-
- -- part 8 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=98 top=33 right=56 bottom=132
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Monday
-
-
- -- part 9 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=248 top=33 right=56 bottom=282
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Tuesday
-
-
- -- part 10 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=421 top=33 right=56 bottom=455
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Wednesday
-
-
- -- part 11 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=109 top=131 right=154 bottom=143
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Thursday
-
-
- -- part 12 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=237 top=131 right=154 bottom=271
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Friday
-
-
- -- part 13 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=354 top=131 right=154 bottom=388
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Saturday
-
-
- -- part 14 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=417 top=131 right=154 bottom=451
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Sunday
-
-
- -- part 16 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=317 top=243 right=268 bottom=495
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Week
-
-
- -- part 17 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=446 top=274 right=304 bottom=484
- -- title width / last selected line: 0
- -- icon id / first selected line: 11045 / 11045
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- go "Home"
- end mouseUp
-
-
-
- -- part 18 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=375 top=274 right=305 bottom=410
- -- title width / last selected line: 0
- -- icon id / first selected line: 30696 / 30696
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Phone
- ----- HyperTalk script -----
- on mouseUp
- get the selection
- if it is empty then get the message
- if it is empty then ask "Dial what number?"
- if it is not empty then
- push this card
- visual effect zoom open
- go to stack "Phone"
- dial it
- pop card
- end if
- end mouseUp
-
-
-
- -- part 19 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=412 top=274 right=304 bottom=445
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Calendar
- ----- HyperTalk script -----
- on mouseUp
- get the seconds
- convert it to dateItems
- put ((item 1 of it) - 1987) *2 into whichSix
- if item 2 of it > 6 then add 1 to whichSix
- visual effect zoom open
- if whichSix < 1 then go card 1 of stack "Datebook"
- else if whichSix > 5 then go card 5 of stack "Datebook"
- else
- go to card whichSix of stack "Datebook"
- send "bracketWeek" && the seconds to this card
- end if
- end mouseUp
-
-
-
- -- part 20 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=341 top=275 right=305 bottom=374
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Address
- ----- HyperTalk script -----
- on mouseUp
- get the selection
- visual effect zoom open
- go to "Address"
- if it is not empty then find it
- end mouseUp
-
-
-
- -- part 22 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=444 top=317 right=333 bottom=485
- -- title width / last selected line: 0
- -- icon id / first selected line: 6720 / 6720
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Return
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- pop card
- end mouseUp
-
-
-
- -- part 23 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=224 top=315 right=338 bottom=252
- -- title width / last selected line: 0
- -- icon id / first selected line: 15420 / 15420
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
- ----- HyperTalk script -----
- on mouseUp
- visual effect wipe right
- go to prev card
- end mouseUp
-
-
-
-
- -- part 24 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=267 top=315 right=338 bottom=294
- -- title width / last selected line: 0
- -- icon id / first selected line: 16560 / 16560
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
- ----- HyperTalk script -----
- on mouseUp
- visual effect wipe left
- go to next card
- end mouseUp
-
-
-
- -- part 25 (button)
- -- low flags: 00
- -- high flags: 8004
- -- rect: left=387 top=318 right=333 bottom=433
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Extend
- ----- HyperTalk script -----
- on mouseUp
- extend
- end mouseUp
-
-